package com.xinongbest.mall.service;

import com.github.pagehelper.PageInfo;
import com.xinongbest.mall.model.dto.ProductAddDto;
import com.xinongbest.mall.model.dto.ProductRequestDto;
import com.xinongbest.mall.model.pojo.Product;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
 * @author lemonwan
 * 商品相关操作接口
 */

public interface ProductService {
    /**
     * 添加商品
     *
     * @param productAddDto
     */
    void add(ProductAddDto productAddDto);

    /**
     * 上传商品图片
     *
     * @param servletRequest
     * @param file
     * @return
     */
    String uploadImage(HttpServletRequest servletRequest, MultipartFile file);

    int batchUpdateSellStatus(Integer[] ids, Integer sellStatus);

    PageInfo listForAdmin(Integer pageNum, Integer pageSize);

    Product detail(Integer id);

    PageInfo selectList(ProductRequestDto requestDto);
}
